const express = require('express');
const app = express();

app.use(express.static('public'));

const bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({extended:true}));

const cors = require('cors');
app.use(cors());
const router = require('./router/router')
// 应用路由
app.use(router);



app.listen(3030,err=>{
    if(!err) console.log('服务器启动成功');
    else console.log(err);
})